public class Test {

    public static void main(String[] args) {
        MyBinaryTree myBinaryTree=new MyBinaryTree();
        MyBinaryTree.TreeNode root=myBinaryTree.createTree();
        System.out.println("=====前序遍历=====");
        myBinaryTree.preOrder(root);
        System.out.println();
        System.out.println("=====中序遍历=====");
        myBinaryTree.inOrder(root);
        System.out.println();
        System.out.println("=====后序遍历=====");
        myBinaryTree.postOrder(root);
        System.out.println();
//        System.out.println("=====节点个数:=====");
//        System.out.println(myBinaryTree.size(root));
//        myBinaryTree.size2(root);
//        System.out.println(MyBinaryTree.nodeSize);
//        System.out.println("======叶子节点个数:=====");
//        System.out.println(myBinaryTree.leafNodeSize(root));
//        myBinaryTree.leafNodeSize2(root);
//        System.out.println(MyBinaryTree.leafNodeCount);
//        System.out.println("=====测试第k层节点个数=====");
//        System.out.println(myBinaryTree.getKLevelNodeSize(root, 2));
//        System.out.println("=====求树的高度=====");
//        System.out.println(myBinaryTree.getHeight(root));
//        System.out.println("=====查找某个节点并返回=====");
//        System.out.println(myBinaryTree.find(root, 'E').val);
//
//        System.out.println(myBinaryTree.invertTree(root).val);

        System.out.println("======层序遍历======");
        myBinaryTree.levelOrder(root);

        System.out.println("=======判断是否为完全二叉树======");
        System.out.println(myBinaryTree.isCompleteTree(root));

        System.out.println("=====测试前序遍历的非递归实现=====");
        myBinaryTree.preOrderNot(root);
        System.out.println();

        System.out.println("=====测试中序遍历的非递归实现=====");
        myBinaryTree.inOrderNot(root);
        System.out.println();

        System.out.println("=====测试后序遍历的非递归实现=====");
        myBinaryTree.postOrderNot(root);
        System.out.println();
    }
}
